package com.probox.platform.api.domain;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Time;
import java.util.Date;

@Data
public class PlatformStoreVo implements Serializable {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    //默认主键自增
    @TableId(value = "STORE_UID", type = IdType.AUTO)
    private Long storeUid;

    /**
     * 平台uid
     */
    @Excel(name = "平台uid")
    @ApiModelProperty(value = "平台uid")
    private Long platformUid;

    /**
     * appid
     */
    @Excel(name = "appid")
    @ApiModelProperty(value = "appid")
    private String appid;

    /**
     * 门店名称
     */
    @Excel(name = "门店名称")
    @ApiModelProperty(value = "门店名称")
    private String storeName;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    @ApiModelProperty(value = "联系人")
    private String storeContacts;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    @ApiModelProperty(value = "联系电话")
    private String storePhone;

    /**
     * 门店省份
     */
    @Excel(name = "门店省份")
    @ApiModelProperty(value = "门店省份")
    private String storeProvince;

    /**
     * 门店城市
     */
    @Excel(name = "门店城市")
    @ApiModelProperty(value = "门店城市")
    private String storeCity;

    /**
     * 门店区域
     */
    @Excel(name = "门店区域")
    @ApiModelProperty(value = "门店区域")
    private String storeArea;

    /**
     * 门店详细地址
     */
    @Excel(name = "门店详细地址")
    @ApiModelProperty(value = "门店详细地址")
    private String storeAddress;

    /**
     * 门店banner
     */
    @Excel(name = "门店banner")
    @ApiModelProperty(value = "门店banner")
    private String storeBanner;

    public String [] getStoreBannerArr(){
        if(ObjectUtil.isEmpty(storeBanner)) return null;
        return storeBanner.split(",");
    }

    public String  getStoreBannerOne(){
        if(ObjectUtil.isEmpty(storeBanner)) return null;
        return storeBanner.split(",")[0];
    }

    /**
     * 门店详情图
     */
    @Excel(name = "门店详情图")
    @ApiModelProperty(value = "门店详情图")
    private String storeImg;

    public String [] getStoreImgArr(){
        if(ObjectUtil.isEmpty(storeImg)) return null;
        return storeImg.split(",");
    }

    public String  getStoreImgOne(){
        if(ObjectUtil.isEmpty(storeImg)) return null;
        return storeImg.split(",")[0];
    }

    /**
     * 经度
     */
    @Excel(name = "经度")
    @ApiModelProperty(value = "经度")
    private String storeLongitude;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    @ApiModelProperty(value = "纬度")
    private String storeLatitude;

    /**
     * 状态（1有效/0无效)
     */
    @Excel(name = "状态", readConverterExp = "状态（1有效/0无效)")
    @ApiModelProperty(value = "状态")
    private String dataStatus;

    /**
     * 审核状态
     */
    @Excel(name = "审核状态")
    private String auditStatus;

    /**
     * $column.columnComment
     */
    @Excel(name = "审核状态")
    private Long createUid;

    /**
     * $column.columnComment
     */
    @Excel(name = "审核状态")
    private String createName;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核状态", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * $column.columnComment
     */
    @Excel(name = "审核状态")
    private Long updateUid;

    /**
     * $column.columnComment
     */
    @Excel(name = "审核状态")
    private String updateName;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核状态", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 审核人ID
     */
    @Excel(name = "审核人ID")
    @ApiModelProperty(value = "审核人ID")
    private Long auditUid;

    /**
     * 审核人名称
     */
    @Excel(name = "审核人名称")
    @ApiModelProperty(value = "审核人名称")
    private String auditName;

    /**
     * 审核人时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核人时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核人时间")
    private Date auditTime;

    /**
     * 客户id
     */
    @Excel(name = "客户id")
    @ApiModelProperty(value = "客户id")
    private Long customerUid;

    private String storeVideo;

    //服务类别(Life-生美/Medical-医美/probxplus-菠萝+)
    private String serviceType;


    //营业开始时间
    private Time startTime;
    //营业结束时间
    private Time endTime;

    private String occupationTime;
}
